import { gstyRequest } from '../'
//查询计算资源分区
export async function getResourceZone(params) {
  return gstyRequest.get({
    url: '/calc/resource/zone/list',
    showLoading: true,
    params
  })
}
//查询预报断面-右侧全面板展示
export async function getResourceSec(params) {
  return gstyRequest.get({
    url: '/calc/resource/sections',
    showLoading: true,
    params
  })
}
//查询资源分区下水文分组及分组断面
export async function getResourceGroupInfos(params) {
  return gstyRequest.get({
    url: '/calc/resource/hyd/groupInfos',
    showLoading: true,
    params
  })
}
//新增计算资源分区
export async function addResourceZone(data) {
  return gstyRequest.post({
    url: '/calc/resource/zone/add',
    showLoading: true,
    data
  })
}
//删除计算资源分区
export async function deleteResourceZone(data) {
  return gstyRequest.post({
    url: '/calc/resource/zone/delete',
    showLoading: true,
    data
  })
}
//查询计算机节点信息
export async function getResourceNodes(params) {
  return gstyRequest.get({
    url: '/calc/resource/nodes',
    showLoading: true,
    params
  })
}
// 添加水文计算节点
export async function addResourceNodes(data) {
  return gstyRequest.post({
    url: '/calc/resource/nodes/add',
    showLoading: true,
    data
  })
}
// 修改水文计算节点
export async function modifyResourceNodes(data) {
  return gstyRequest.post({
    url: '/calc/resource/nodes/modify',
    showLoading: true,
    data
  })
}
// 删除水文计算节点
export async function deleteResourceNodes(data) {
  return gstyRequest.post({
    url: '/calc/resource/nodes/delete',
    showLoading: true,
    data
  })
}
//查询查询模型资源配置
export async function getResourceConfig(params) {
  return gstyRequest.get({
    url: '/calc/resource/config',
    showLoading: true,
    params
  })
}
// 添加模型资源配置
export async function addResourceConfig(data) {
  return gstyRequest.post({
    url: '/calc/resource/config/add',
    showLoading: true,
    data
  })
}
// 修改模型资源配置
export async function modifyResourceConfig(data) {
  return gstyRequest.post({
    url: '/calc/resource/config/modify',
    showLoading: true,
    data
  })
}
// 删除水文计算节点
export async function deleteResourceConfig(data) {
  return gstyRequest.post({
    url: '/calc/resource/config/delete',
    showLoading: true,
    data
  })
}
//添加水文计算分组
export async function addResourceGroup(data) {
  return gstyRequest.post({
    url: '/calc/resource/hyd/addGroup',
    showLoading: true,
    data
  })
}
//修改计算资源分区
export async function updateResourceZone(data) {
  return gstyRequest.post({
    url: '/calc/resource/zone/modify',
    showLoading: true,
    data
  })
}
//删除水文计算分组
export async function deleteResourceGroupInfos(data) {
  return gstyRequest.post({
    url: '/calc/resource/hyd/deleteGroup',
    showLoading: true,
    data
  })
}
//修改水文计算分组
export async function updateResourceGroupInfos(data) {
  return gstyRequest.post({
    url: '/calc/resource/hyd/modifyGroup',
    showLoading: true,
    data
  })
}
